<template>
  <!-- 自定义加载动画 -->
  <div class="loading">
    <div class="loadbg2">
      <ul class="loading_circle" style="transform: scale(1);">
        <li class="line" style="background: rgb(66, 185, 131);"></li>
        <li class="line" style="background: rgb(66, 185, 131);"></li>
        <li class="line" style="background: rgb(66, 185, 131);"></li>
        <li class="line" style="background: rgb(66, 185, 131);"></li>
        <li class="line" style="background: rgb(66, 185, 131);"></li>
        <li class="line" style="background: rgb(66, 185, 131);"></li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  props: {},
  data() {
    return {

    }
  },
  computed: {},
  watch: {},
  created() { },
  mounted() { },
  updated() { },
  destroyed() { },
  // 如果页面有keep-alive缓存功能，这个函数会触发
  activated() { },
  methods: {},
  filters: {},
}
</script>

<style lang="scss" scoped>
.loading {
  width: 100%;
  height: 100%;

  .loadbg1 {
    top: 0;
    left: 0;
    position: fixed
  }

  .loadbg2 {
    // position: absolute;
  }

  .loadbg1,
  .loadbg2 {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: hsla(0, 0%, 100%, .6);
    z-index: 9999999;
  }

  .loading_circle {
    padding: 0;
    margin: 0;
    width: 100px;
    height: 100px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;

    .line {
      width: 5px;
      height: 40px;
      margin: 0 5px;
      position: relative;
      border-top-left-radius: 5px;
      border-top-right-radius: 5px;
      border-bottom-left-radius: 5px;
      border-bottom-right-radius: 5px;
    }
  }

  // 动画
  .loading_circle .line:first-of-type {
    -webkit-animation: transiteAnimate .5s 0s infinite;
    animation: transiteAnimate .5s 0s infinite
  }

  .loading_circle .line:nth-of-type(2) {
    -webkit-animation: transiteAnimate .5s .1s infinite;
    animation: transiteAnimate .5s .1s infinite
  }

  .loading_circle .line:nth-of-type(3) {
    -webkit-animation: transiteAnimate .5s .2s infinite;
    animation: transiteAnimate .5s .2s infinite
  }

  .loading_circle .line:nth-of-type(4) {
    -webkit-animation: transiteAnimate .5s .3s infinite;
    animation: transiteAnimate .5s .3s infinite
  }

  .loading_circle .line:nth-of-type(5) {
    -webkit-animation: transiteAnimate .5s .4s infinite;
    animation: transiteAnimate .5s .4s infinite
  }

  .loading_circle .line:nth-of-type(6) {
    -webkit-animation: transiteAnimate .5s .5s infinite;
    animation: transiteAnimate .5s .5s infinite
  }

  @-webkit-keyframes transiteAnimate {
    0% {
      height: 60px
    }

    50% {
      height: 30px
    }

    to {
      height: 60px
    }
  }

  @keyframes transiteAnimate {
    0% {
      height: 60px
    }

    50% {
      height: 30px
    }

    to {
      height: 60px
    }
  }
}
</style>